package com.tuanzi.loan.schedule.receipt.monitor.template;

import com.tuanzi.loan.schedule.receipt.monitor.ITemplate;
import com.tuanzi.loan.schedule.receipt.monitor.sender.DingTalkService;
import org.springframework.mail.javamail.JavaMailSender;

public class TemplateFactory {

    public static ITemplate createEmailTemplate(JavaMailSender mailSender, String from, String to, String subject, String content) {
        return new EmailTemplate(mailSender, from, to, subject, content);
    }

    public static ITemplate createDingDingTemplate(DingTalkService dingTalkService, String url, String content) {
        return new DingDingTemplate(dingTalkService, url, content);
    }
}
